<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        GraphicImage
    </ui:define>

    <ui:define name="description">
        GraphicImage is capable of presenting images that are created programatically at runtime or images stored in a database.
    </ui:define>

    <ui:param name="documentationLink" value="/components/graphicimage"/>

    <ui:define name="implementation">

        <div class="card">
            <h5>Static Image</h5>
            <p:graphicImage name="images/nature/nature4.jpg" library="demo"/>
        </div>

        <div class="card">
            <h5>JFreeChart</h5>
            <p:graphicImage value="#{graphicImageView.chart}"/>
            <p:graphicImage value="#{graphicImageView.chartAsByteArray}"/>
            <p:graphicImage value="#{graphicImageView.chartAsStream}"/>
        </div>

        <div class="card">
            <h5>JFreeChart rendered as DataURI / ViewScoped support</h5>
            <p:graphicImage value="#{graphicImageView.chart}" stream="false"/>
            <p:graphicImage value="#{graphicImageView.chartAsByteArray}" stream="false"/>
            <p:graphicImage value="#{graphicImageView.chartAsStream}" stream="false"/>
        </div>

        <div class="card">
            <h5>JFreeChart optimized without buffering</h5>
            <p:graphicImage value="#{graphicImageView.chartWithoutBuffering}"/>
            <p:graphicImage value="#{graphicImageView.chartWithoutBuffering}" stream="false"/>
        </div>

        <div class="card">
            <h5>GraphicText</h5>
            <p:graphicImage value="#{graphicImageView.graphicText}"/>
        </div>

    </ui:define>

</ui:composition>
